package com.tsmti.system.service.impl;

import com.tsmti.core.common.service.impl.BaseServiceImpl;
import com.tsmti.system.dao.BillTemplateDao;
import com.tsmti.system.entity.BillTemplate;
import com.tsmti.system.service.BillTemplateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Package：com.tsmti.system.service.impl
 * @Class：BillTemplateServiceImpl
 * @Description： TODO
 * @Author：zcw
 * @Date：Created in 2018/6/12 14:48
 * @Company:
 * @Version：
 * @Modified By:
 */
@Service("billTemplateService")
public class BillTemplateServiceImpl extends BaseServiceImpl<BillTemplate> implements BillTemplateService {
    @Autowired
    @Qualifier(value = "billTemplateDao")
    private BillTemplateDao billTemplateDao;
    /**
     *根据code获取模板
     * @param code
     * @param orgId
     * @return
     */
    @Override
    @Transactional(readOnly = true, rollbackFor = Exception.class)
    public BillTemplate getBillTemplateByCode(String code, String orgId) {
        return billTemplateDao.getBillTemplateByCode(code,orgId);
    }
}
